//10.代理模式典型应用之proxy
let obj = {
  a: 10,
  b: 'hello'
};
let proxy = new Proxy(obj, {
  get(target,key){
    return target[key] +'经过了getted'
  },
  set(target,key,value){
    target[key] =value +'经过了setted';
    return true
  }
});
console.log(proxy.a);
proxy.b = 'word';
console.log(proxy.b)
